//
//  RechargeListCell.m
//  CBT
//
//  Created by Mr.Zhang on 2018/11/24.
//  Copyright © 2018 Mr.Zhang. All rights reserved.
//

#import "RechargeListCell.h"

@interface RechargeListCell()

@property (weak, nonatomic) IBOutlet UILabel *rightLabel;
@property (weak, nonatomic) IBOutlet UILabel *yearLabel;
@property (weak, nonatomic) IBOutlet UILabel *timeLabel;

@end

@implementation RechargeListCell

- (void)awakeFromNib {
    [super awakeFromNib];
}

-(void)setModel:(RechargeListItemModel *)model
{
    self.rightLabel.text= [NSString stringWithFormat:@"+%@ %@",[DecimalNumberTool formatNumberWithString:model.investAmount isAssets:YES],self.symbol];
    self.yearLabel.text = [NSString getCBTShowDateYearMonthWithTime:[model.investDate longLongValue]];  
    self.timeLabel.text = [NSString getCBTShowTimeWithTime:[model.investDate longLongValue]];
}

-(void)setRechargeModel:(RechargeRecordItemModel *)rechargeModel
{
    self.rightLabel.text = [NSString stringWithFormat:@"+%@ %@",[DecimalNumberTool formatNumberWithString:rechargeModel.amount isAssets:YES],rechargeModel.coinSymbol];
    self.yearLabel.text  = [NSString getCBTShowDateYearMonthWithTime:[rechargeModel.rechargeDate longLongValue]];
    self.timeLabel.text  = [NSString getCBTShowTimeWithTime:[rechargeModel.rechargeDate longLongValue]];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];
}

@end
